package com.briup.jd2407cms.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.briup.jd2407cms.domain.Article;
import com.baomidou.mybatisplus.extension.service.IService;
import com.briup.jd2407cms.domain.extend.ArticleExtend;
import org.springframework.web.bind.annotation.RequestParam;

import java.time.LocalDateTime;
import java.util.List;

/**
 *
 */
public interface ArticleService extends IService<Article> {

    /**
     * 根据栏目id查询下属文章
     * @param categoryId
     * @return
     */
    List<Article> getArticleByCategoryId(Integer categoryId);

    /**
     * 新增/ 修改文章
     * @param article
     */
    void saveOrUpdateArticle(Article article);

    /**
     * 审核文章
     * @param id 文章id
     * @param status 审核状态
     */
    void changeArticleStatus(Long id, String status);

    void deleteArticleBatch(List<Long> ids);

    ArticleExtend getArticleDetailById(Long id);

    IPage<ArticleExtend> getAllByConditionByPage(Integer pageNum,Integer pageSize, String name, String status, Integer categoryId, Long userId, Integer charged, LocalDateTime begin, LocalDateTime end);

}
